package io.jsen.meta.diff.annotation.parser;

import io.jsen.meta.diff.annotation.empty.IgnoreIndexFeature;
import io.jsen.meta.diff.feature.IndexFeature;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author jsen
 * @date 2021/8/10
 */
@Data
@AllArgsConstructor
public class CoAnnotation {
    private boolean ignore;
    private boolean uniqueKey;
    private String alias;
    @SuppressWarnings("rawtypes")
    private Class<? extends IndexFeature> indexFeature;

    @SuppressWarnings("rawtypes")
    public Class<? extends IndexFeature> getIndexFeature() {
        if (indexFeature == IgnoreIndexFeature.class) {
            return null;
        }
        return indexFeature;
    }
}
